<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<script>
    var a = ['tom','frank','jack'];
   // var r = a.join("");
    r = a.reverse();
    var a = 'javascript is the best language';
    r = a.split("");
    r = r.reverse();


    r = r.join("")
    console.log(r);
</script>

</body>
</html>